package com.example.forum.services;

import com.example.forum.model.Article;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface IArticleService {      //发布帖子
    @Transactional      //当前方法执行的过程会被事务管理起来
    void create(Article article);

    List<Article> selectAll();

    List<Article> selectByBoardId (Long boardId);
    Article selectDetailById(Long id);

    void modify(Long id,String title,String content);

    Article selectById(Long id);

    void thumbsUpById(Long id);

    @Transactional
    void deleteById(Long id);

    void addOnceReplayArticleCountById(Long id);

    //根据用户id查询用户发帖的列表
    List<Article> selectByUserId (Long userid);
}
